stylecontext: update_animating() properly
authorBenjamin Otte <otte@redhat.com>
Tue, 6 Jan 2015 11:08:49 +0000 (12:08 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 7 Jan 2015 13:26:48 +0000 (14:26 +0100)
Because we can switch from animating to non-animating pretty much
anywhere, do the check for animations unconditionally instead of trying
to cram it into the correct if path (and failing).

gtk/gtkstylecontext.c

index 45f53bfb920e2ffb534ebe5646018f87dc6eb531..c83fd463009bf80e3d502483529fbe6117eb7cdd 100644 (file)
@@ -2948,7 +2948,6 @@ _gtk_style_context_validate (GtkStyleContext  *context,
                                           gtk_style_context_should_create_transitions (context) ? current : NULL);
 
       style_info_set_values (info, style);
-      _gtk_style_context_update_animating (context);
 
       g_object_unref (static_style);
       g_object_unref (style);
@@ -2995,13 +2994,11 @@ _gtk_style_context_validate (GtkStyleContext  *context,
                                                            timestamp);
           style_info_set_values (info, new_values);
           g_object_unref (new_values);
-
-          if (!GTK_IS_CSS_ANIMATED_STYLE (info->values) ||
-              gtk_css_animated_style_is_static (GTK_CSS_ANIMATED_STYLE (info->values)))
-            _gtk_style_context_update_animating (context);
         }
     }
 
+  _gtk_style_context_update_animating (context);
+
   changes = gtk_css_style_get_difference (info->values, current);
   g_object_unref (current);